package bc

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/global"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type BcTempRouter struct {
}

// InitBcTempRouter 初始化 bcTemp表 路由信息
func (s *BcTempRouter) InitBcTempRouter(Router *gin.RouterGroup) {
	bcTempRouter := Router.Group("bcTemp").Use(middleware.OperationRecord())
	bcTempRouterWithoutRecord := Router.Group("bcTemp")
	var bcTempApi = v1.ApiGroupApp.BcApiGroup.BcTempApi
	{
		bcTempRouter.POST("createBcTemp", bcTempApi.CreateBcTemp)             // 新建bcTemp表
		bcTempRouter.DELETE("deleteBcTemp", bcTempApi.DeleteBcTemp)           // 删除bcTemp表
		bcTempRouter.DELETE("deleteBcTempByIds", bcTempApi.DeleteBcTempByIds) // 批量删除bcTemp表
		bcTempRouter.PUT("updateBcTemp", bcTempApi.UpdateBcTemp)              // 更新bcTemp表
	}
	{
		bcTempRouterWithoutRecord.GET("findBcTemp", bcTempApi.FindBcTemp)       // 根据ID获取bcTemp表
		bcTempRouterWithoutRecord.GET("getBcTempList", bcTempApi.GetBcTempList) // 获取bcTemp表列表
	}
	global.GVA_Timer.AddTaskByFunc("func", "@daily", bcTempApi.DeleteBcTempByTime)
}
